package Logic;

public class GameTime 
{
	public static final int DELAY_TIME = 50; //ms
	private int ticksToWait;
	private int tick;
	
	public GameTime(int waitTime) //in ms
	{
		this.ticksToWait = waitTime / DELAY_TIME;
		this.tick = 0;
	}
	
	public boolean hasTickedOver()
	{
		if(++tick == ticksToWait)
		{
			reset();
			return true;
		}
		return false;
	}
	
	public void reset()
	{
		this.tick = 0;
	}
}
